﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ecosystème
{
    public partial class OptionGraphique : Form
    {
        public OptionGraphique()
        {
            InitializeComponent();
            dgvOption.Rows.Add("Texture");
            dgvOption.Rows.Add("Modelisation");
            dgvOption.Rows.Add("Affichage");
            dgvOption.Rows.Add("Persistence");
        }

        private void rbUltra_CheckedChanged(object sender, EventArgs e)
        {
            if (rbUltra.Checked)
            {
                dgvOption.Rows[0].Cells["ultra"].Value = true;
                dgvOption.Rows[1].Cells["ultra"].Value = true;
                dgvOption.Rows[2].Cells["ultra"].Value = true;
                dgvOption.Rows[3].Cells["ultra"].Value = true;

                dgvOption.Rows[0].Cells["haute"].Value = false;
                dgvOption.Rows[1].Cells["haute"].Value = false;
                dgvOption.Rows[2].Cells["haute"].Value = false;
                dgvOption.Rows[3].Cells["haute"].Value = false;

                dgvOption.Rows[0].Cells["moyenne"].Value = false;
                dgvOption.Rows[1].Cells["moyenne"].Value = false;
                dgvOption.Rows[2].Cells["moyenne"].Value = false;
                dgvOption.Rows[3].Cells["moyenne"].Value = false;

                dgvOption.Rows[0].Cells["basse"].Value = false;
                dgvOption.Rows[1].Cells["basse"].Value = false;
                dgvOption.Rows[2].Cells["basse"].Value = false;
                dgvOption.Rows[3].Cells["basse"].Value = false;
            }
        }

        private void rbHaute_CheckedChanged(object sender, EventArgs e)
        {
            if (rbHaute.Checked)
            {
                dgvOption.Rows[0].Cells["ultra"].Value = false;
                dgvOption.Rows[1].Cells["ultra"].Value = false;
                dgvOption.Rows[2].Cells["ultra"].Value = false;
                dgvOption.Rows[3].Cells["ultra"].Value = false;

                dgvOption.Rows[0].Cells["haute"].Value = true;
                dgvOption.Rows[1].Cells["haute"].Value = true;
                dgvOption.Rows[2].Cells["haute"].Value = true;
                dgvOption.Rows[3].Cells["haute"].Value = true;

                dgvOption.Rows[0].Cells["moyenne"].Value = false;
                dgvOption.Rows[1].Cells["moyenne"].Value = false;
                dgvOption.Rows[2].Cells["moyenne"].Value = false;
                dgvOption.Rows[3].Cells["moyenne"].Value = false;

                dgvOption.Rows[0].Cells["basse"].Value = false;
                dgvOption.Rows[1].Cells["basse"].Value = false;
                dgvOption.Rows[2].Cells["basse"].Value = false;
                dgvOption.Rows[3].Cells["basse"].Value = false;
            }
        }

        private void rbMoyenne_CheckedChanged(object sender, EventArgs e)
        {
            if (rbMoyenne.Checked)
            {
                dgvOption.Rows[0].Cells["ultra"].Value = false;
                dgvOption.Rows[1].Cells["ultra"].Value = false;
                dgvOption.Rows[2].Cells["ultra"].Value = false;
                dgvOption.Rows[3].Cells["ultra"].Value = false;

                dgvOption.Rows[0].Cells["haute"].Value = false;
                dgvOption.Rows[1].Cells["haute"].Value = false;
                dgvOption.Rows[2].Cells["haute"].Value = false;
                dgvOption.Rows[3].Cells["haute"].Value = false;

                dgvOption.Rows[0].Cells["moyenne"].Value = true;
                dgvOption.Rows[1].Cells["moyenne"].Value = true;
                dgvOption.Rows[2].Cells["moyenne"].Value = true;
                dgvOption.Rows[3].Cells["moyenne"].Value = true;

                dgvOption.Rows[0].Cells["basse"].Value = false;
                dgvOption.Rows[1].Cells["basse"].Value = false;
                dgvOption.Rows[2].Cells["basse"].Value = false;
                dgvOption.Rows[3].Cells["basse"].Value = false;
            }
        }

        private void rbBasse_CheckedChanged(object sender, EventArgs e)
        {
            if (rbBasse.Checked)
            {
                dgvOption.Rows[0].Cells["ultra"].Value = false;
                dgvOption.Rows[1].Cells["ultra"].Value = false;
                dgvOption.Rows[2].Cells["ultra"].Value = false;
                dgvOption.Rows[3].Cells["ultra"].Value = false;

                dgvOption.Rows[0].Cells["haute"].Value = false;
                dgvOption.Rows[1].Cells["haute"].Value = false;
                dgvOption.Rows[2].Cells["haute"].Value = false;
                dgvOption.Rows[3].Cells["haute"].Value = false;

                dgvOption.Rows[0].Cells["moyenne"].Value = false;
                dgvOption.Rows[1].Cells["moyenne"].Value = false;
                dgvOption.Rows[2].Cells["moyenne"].Value = false;
                dgvOption.Rows[3].Cells["moyenne"].Value = false;

                dgvOption.Rows[0].Cells["basse"].Value = true;
                dgvOption.Rows[1].Cells["basse"].Value = true;
                dgvOption.Rows[2].Cells["basse"].Value = true;
                dgvOption.Rows[3].Cells["basse"].Value = true;
            }
        }

        private void btnRetour_Click(object sender, EventArgs e)
        {
            this.Close();
        }

    }
}
